package org.demo.test;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.PropertyConfigurator;
import org.boxlayout.gui.BoxLayoutEngine;
import org.boxlayout.gui.BoxLayoutFrame;
import org.boxlayout.gui.VisualElement;
import org.boxlayout.gui.layout.LayoutFactory;
import org.boxlayout.gui.type.ColorEnum;

public class TextTest3d {
	
	public TextTest3d() {
		final Log log = LogFactory.getLog("main");
    	PropertyConfigurator.configure("log4j.properties");
    	BoxLayoutFrame blf  = new BoxLayoutFrame();
    	BoxLayoutEngine ble = blf.getBoxLayoutEngine();
    	ble.setOrtho(false);
    	Float[] body = {2f,-2f,5f};
		Float[] target = {2f,-2f,0f};
		ble.getCamera().setBodyPosition(body);
		ble.getCamera().setTargetPosition(target);
		
    	final VisualElement root = ble.createElement()
    	.setLayout(LayoutFactory.getInstance().getVerticalLayout())
    	.setText("1gAbcdef")
    	//.setTextSize(1f)
    	.setColor(ColorEnum.GREEN)
    	 .setPreferedWidth(2.0f).setPreferedHeight(2.0f)
    	;
    	
    	ble.setRootElement(root);
    	blf.start();
	}
	
	
	public static void main(String[] args) {
		new TextTest3d();
	}

}
